package cn.iocoder.yudao.module.ent.document.node;

import cn.iocoder.yudao.module.ent.document.BaseNode;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * 招投标信息 节点
 */

@Document(indexName = "node_tender_bidding")
@Data
public class NodeTenderBidding extends BaseNode {

    //公司数据加密id
    @Field(name = "cid", type = FieldType.Keyword)
    private String cid;

    @Field(name = "create_time", type = FieldType.Text)
    private String createTime;

    @Field(name = "code", type = FieldType.Long)
    private Long code;

    //地域
    @Field(name = "district", type = FieldType.Text)
    private String district;

    //发布日期
    @Field(name = "publishDate", type = FieldType.Text)
    private String publishDate;

    //标题
    @Field(name = "title", type = FieldType.Text)
    private String title;


    @Field(name = "tender", type = FieldType.Nested)
    private List<Tender> tender;

    @Field(name = "winner", type = FieldType.Nested)
    private List<Winner> winner;

    class Tender {

        //招投标公司id数据加密
        @Field(name = "data_cid", type = FieldType.Text)
        private String dataCid;

        //数据分类
        @Field(name = "name", type = FieldType.Text)
        private String name;
    }

    class Winner {

        //招投标公司id数据加密
        @Field(name = "data_cid", type = FieldType.Text)
        private String dataCid;

        //数据分类
        @Field(name = "name", type = FieldType.Text)
        private String name;
    }
}
